package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AiVipQyTMapper;
import com.ruoyi.system.domain.AiVipQyT;
import com.ruoyi.system.service.IAiVipQyTService;

/**
 * 会员关联权益Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-08
 */
@Service
public class AiVipQyTServiceImpl implements IAiVipQyTService 
{
    @Autowired
    private AiVipQyTMapper aiVipQyTMapper;

    /**
     * 查询会员关联权益
     * 
     * @param id 会员关联权益主键
     * @return 会员关联权益
     */
    @Override
    public AiVipQyT selectAiVipQyTById(Long id)
    {
        return aiVipQyTMapper.selectAiVipQyTById(id);
    }

    /**
     * 查询会员关联权益列表
     * 
     * @param aiVipQyT 会员关联权益
     * @return 会员关联权益
     */
    @Override
    public List<AiVipQyT> selectAiVipQyTList(AiVipQyT aiVipQyT)
    {
        return aiVipQyTMapper.selectAiVipQyTList(aiVipQyT);
    }

    /**
     * 新增会员关联权益
     * 
     * @param aiVipQyT 会员关联权益
     * @return 结果
     */
    @Override
    public int insertAiVipQyT(AiVipQyT aiVipQyT)
    {
        aiVipQyT.setCreateTime(DateUtils.getNowDate());
        return aiVipQyTMapper.insertAiVipQyT(aiVipQyT);
    }

    /**
     * 修改会员关联权益
     * 
     * @param aiVipQyT 会员关联权益
     * @return 结果
     */
    @Override
    public int updateAiVipQyT(AiVipQyT aiVipQyT)
    {
        aiVipQyT.setUpdateTime(DateUtils.getNowDate());
        return aiVipQyTMapper.updateAiVipQyT(aiVipQyT);
    }

    /**
     * 批量删除会员关联权益
     * 
     * @param ids 需要删除的会员关联权益主键
     * @return 结果
     */
    @Override
    public int deleteAiVipQyTByIds(Long[] ids)
    {
        return aiVipQyTMapper.deleteAiVipQyTByIds(ids);
    }

    /**
     * 删除会员关联权益信息
     * 
     * @param id 会员关联权益主键
     * @return 结果
     */
    @Override
    public int deleteAiVipQyTById(Long id)
    {
        return aiVipQyTMapper.deleteAiVipQyTById(id);
    }
}
